package com.eurekaclient.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.xml.ws.RequestWrapper;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

@RestController
public class ClientController {
    @Value("${server.port}")
    String port;
    @RequestMapping("/hi")
    public String client(@RequestParam(value = "name", defaultValue = "beigege") String name) {
        Map demo=new ConcurrentHashMap();
        demo.put("demo","0");
        System.out.println(demo.toString());
        return "hi " + name + " ,i am from port:" + port;
    }
}
